home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 15604 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  918 b 

  1. Path: news-1.csn.net!carbon!ouray!lnreeder
  2. From: lnreeder@ouray.cudenver.edu (Larry)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: G++ math question
  5. Date: 6 Apr 1996 04:22:44 GMT
  6. Organization: University of Colorado at Denver
  7. Message-ID: <4k4rik$jcg@carbon.cudenver.edu>
  8. References: <00001a81+0000b148@msn.com>
  9. NNTP-Posting-Host: ouray.cudenver.edu
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12.  
  13. Try linking in the math library, like this:
  14.  
  15.     g++ myprog.cc -o myprog -lm
  16.  
  17. The "-lm" tells the compiler to link in the precompiled math library.
  18.  
  19.  
  20.     -Larry.
  21.  
  22.     
  23.  
  24.  
  25. Roger Marlowe (RMarlowe@msn.com) wrote:
  26. :      I wrote a program on MSVC 4 and I am trying to compile it with G++ 
  27. : in a UNIX envir.
  28. :     G++ doesn't know what 'log()', 'pow()' or 'floor()' are even though 
  29. : I have #included<math.h>.
  30.  
  31. :     Doesn't G++ have math routines or maybe they aren't installed on 
  32. : this particular machine??
  33.  
  34. :                 Thanks for your advice...
  35.  
  36. :                 Roger 
  37.  
  38.